const image_suffix_names = ['png', 'jpg', 'web'];

const video_suffix_names = ['mp4'];
export function fileType(filePath: string) {
	const suffixNameIndex = filePath.lastIndexOf('.');
	if (suffixNameIndex < 0) {
		return '';
	}
	const suffixName = filePath.substring(suffixNameIndex + 1);
	if (image_suffix_names.includes(suffixName.toLowerCase())) {
		return 'image';
	} else if (video_suffix_names.includes(suffixName.toLowerCase())) {
		return 'video';
	}
	return '';
}
